/**
 * 
 */
package com.et114.modules.products.params;

import java.util.List;

//import com.et114.core.common.AppContext;
import com.et114.core.dao.vo.BaseVO;
//import com.et114.core.utility.NumberUtils;
//import com.et114.modules.products.commons.Context;

/*
 * @author guanhw
 */
public class ParamType extends BaseVO {
	private static final long	serialVersionUID	= - 7952150342279531944L;
	private Long				typeId;
	private String				globalKey;
	private String              itemKey ; 
	private String				typeName;
	private String				typeEnName;
	private Boolean				status;
	private Long				displOrder;
	private Byte				showStyle;										// select:
																				// (
																				// 0
																				// ,
																				// 1
																				// ),
																				// radio
																				// :2
																				// ,
																				// text
																				// :
																				// 3
	private String				typeDesc;
	private Byte                workflg ; 
	private Boolean				search4q; //是否显示前台查询
	private Boolean				search4h; //是否显示后台查询
	private Long                parentId;
	
	private ParamType           parent ;
	private List< ParamType >                childs ; 
	private List< ParamType >                enableFormChilds4h ; 
	private List< ParamType >                enableFormChilds4q ; 
	
	private List<  ParamValue  >                paramValues ;
	
	
	private Boolean             showModal ; 

	/**
	 * 
	 */
	public ParamType ( ) {
		// TODO Auto-generated constructor stub
	}
	public Long getTypeId ( ) {
		return typeId;
	}
	public void setTypeId ( Long typeId ) {
		this.typeId = typeId;
	}
	public String getGlobalKey ( ) {
		return globalKey;
	}
	public void setGlobalKey ( String globalKey ) {
		this.globalKey = globalKey;
	}
	public String getItemKey ( ) {
		return itemKey;
	}
	public void setItemKey ( String itemKey ) {
		this.itemKey = itemKey;
	}
	public String getTypeName ( ) {
		return typeName;
	}
	public void setTypeName ( String typeName ) {
		this.typeName = typeName;
	}
	public String getTypeEnName ( ) {
		return typeEnName;
	}
	public void setTypeEnName ( String typeEnName ) {
		this.typeEnName = typeEnName;
	}
	public Boolean getStatus ( ) {
		return status;
	}
	public void setStatus ( Boolean status ) {
		this.status = status;
	}
	public Long getDisplOrder ( ) {
		return displOrder;
	}
	public void setDisplOrder ( Long displOrder ) {
		this.displOrder = displOrder;
	}
	public Byte getShowStyle ( ) {
		return showStyle;
	}
	public void setShowStyle ( Byte showStyle ) {
		this.showStyle = showStyle;
	}
	public String getTypeDesc ( ) {
		return typeDesc;
	}
	public void setTypeDesc ( String typeDesc ) {
		this.typeDesc = typeDesc;
	}
	public Byte getWorkflg ( ) {
		return workflg;
	}
	public void setWorkflg ( Byte workflg ) {
		this.workflg = workflg;
	}
	public Boolean getSearch4q ( ) {
		return search4q;
	}
	public void setSearch4q ( Boolean search4q ) {
		this.search4q = search4q;
	}
	public Boolean getSearch4h ( ) {
		return search4h;
	}
	public void setSearch4h ( Boolean search4h ) {
		this.search4h = search4h;
	}
	
	public List< ParamValue > getParamValues ( ) {
		/*
		if ( !NumberUtils.isEmptyOrZero ( typeId )  ) {
			try {
				paramValues  = ( ( ParamsDao ) AppContext
						.getBean ( Context.PRO_PARAMS_SPRING_DAO ) )
						.getParamValuesByTypeId ( typeId );
			}catch ( Exception ex ) {
				ex.printStackTrace ( ) ;
			}
			
		}		*/
		return paramValues;
	}
	public void setParamValues ( List< ParamValue > paramValues ) {
		this.paramValues = paramValues ;
	}
	public Long getParentId ( ) {
		return parentId;
	}
	public void setParentId ( Long parentId ) {
		this.parentId = parentId;
	}
	public ParamType getParent ( ) {
		/*
		if ( !NumberUtils.isEmptyOrZero ( parentId ) && parentId != -1 ) {
			try {			
				parent = ( ( ParamsDao ) AppContext
						.getBean ( Context.PRO_PARAMS_SPRING_DAO ) )
						.getParamTypeById ( parentId ) ; 
			}catch ( Exception ex ) {
				ex.printStackTrace ( ) ;
			}
		}*/
		return parent;
	}
	public void setParent ( ParamType parent ) {
		this.parent = parent;
	}
	public List < ParamType > getChilds ( ) {
		return childs;
	}
	public void setChilds ( List < ParamType > childs ) {
		this.childs = childs;
	}
	public List < ParamType > getEnableFormChilds4h ( ) {
		return enableFormChilds4h;
	}
	public void setEnableFormChilds4h ( List < ParamType > enableFormChilds4h ) {
		this.enableFormChilds4h = enableFormChilds4h;
	}
	public List < ParamType > getEnableFormChilds4q ( ) {
		return enableFormChilds4q;
	}
	public void setEnableFormChilds4q ( List < ParamType > enableFormChilds4q ) {
		this.enableFormChilds4q = enableFormChilds4q;
	}
	public Boolean getShowModal ( ) {
		return showModal;
	}
	public void setShowModal ( Boolean showModal ) {
		this.showModal = showModal;
	}
}
